home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wonky Flux Batch 2019 02
/
Wonky_Flux_Batch_2019-02.zip
/
Wonky Flux Batch 2019-02
/
093 - Land of Spur.dsk
/
SPUR.LOGON.S
< prev
next >
Wrap
Text File
|
2019-02-17
|
15KB
|
468 lines
; _ _ _ _ _ _ _ _ _
;[_][_][_][_][_][_][_][_][_]
;
; The Land of SPUR
;
; (C)opyright 1987
; Greg W. Davis
; and
; Peripherals Plus
;
; 03/16/87 19:19
;___________________________
; v3.0
; Spur Logon Segment
; _ _ _ _ _ _ _ _ _
;[_][_][_][_][_][_][_][_][_]
public quit1
public quit3
public login2
public new2
public start2
public main
on nocar goto quit4
print chr$(12)
print \\" Welcome to the LAND OF SPUR"
print \\" Presented for Your Enjoyment"
print \\" By The West Coast Edition BBS"
start
store "a:var":dc$="":pn=0:sn=0:ew=clock(1):wa=0:ma=0:pa=0:sl=0:tm=0
dy$=dx$+"spur.data"
open #1,dy$:a=mark(1):close
if (a) and (info(5)) then dy$=ds$+"spur.control":link dy$,"configure"
if a print \"Game Closed!":recall "a:var":link "a:main.seg","fromsys"
start2
open #1,dy$
input #1,g$,np,go,oh,ol,og,lg$
input #1,lc,mc,ic,sc,wc,ac,cg
input #1,pq,sd,mv,td,bd
input #1,dh,dl:close
dy$=dx$+"spur.users":x=1
open #1,dy$
start3
position #1,130,x
input #1,n1$,n,pn:if n=un close:goto login
x=x+1:if x>np close:goto new
goto start3
new
f$=dx$+"new.player.info":gosub show.file
input @0\\"Do you wish to enter the Land? "i$
if i$<>"Y" print:goto quit2
new2
on nocar goto quit4
print \"Enter your Players name (15 Char. Max.)"
input @1 "-> " n1$:if len(n1$)>15 print \"Name too long..":goto new2
new3
print \'Please Choose a Class:
1) Alchemist 4) Paladin 7) Archer
2) Druid 5) Ranger 8) Assassin
3) Fighter 6) Thief 9) Knight
Your Choice (1-9): ';
input i$:pc=val(i$)
if (pc>9) or (pc<1) goto new3
new4
print \'Please Choose a Race:
1) Human 4) Elf 7) Dwarf
2) Ogre 5) Hobbit 8) Orc
3) Gnome 6) Halfling 9) Half-Elf
Your Choice (1-9): ';
input i$:pr=val(i$)
if (pr<1) or (pr>9) goto new4
input @0\"Is this Correct? "i$
if i$<>"Y" input @0\"[R]edo entry or [A]bort? "i$
if i$="R" goto new2
if i$="A" goto quit2
status
print \\"Rolling..";
gosub getnum:pd=b
gosub getnum:ps=b
gosub getnum:pt=b
gosub getnum:pi=b
gosub getnum:pw=b
gosub getnum:pe=b
goto stat1
getnum
zz$=rnd$:a=0
getnum1
print "." ;
b=asc(rnd$)-64:if b>17 then b=b-7
if b=>11 return
a=a+1:if a<10 then zz$=rnd$:goto getnum1
b=b+9:if b<11 goto getnum1
return
stat1
if pc=1 then pw=pw+2:pt=pt-1:pi=pi+2
if pc=2 then pw=pw+2:ps=ps-1:pi=pi+2
if pc=3 then pw=pw-1:pt=pt+2:ps=ps+2:pi=pi-1:pd=pd-1:pe=pe+2
if pc=4 then ps=ps+1:pi=pi+1:pd=pd+1
if pc=5 then ps=ps+1:pi=pi-1:pw=pw+1
if pc=6 then pw=pw-1:pd=pd+1:pe=pe+2
if pc=7 then pd=pd+2:pe=pe-1
if pc=8 then ps=ps+2:pd=pd-1
if pc=9 then pt=pt+1:pi=pi+1:pe=pe-1
if pr=1 then pd=pd+1:ps=ps-1:pi=pi+2:pw=pw+1:pe=pe-1
if pr=2 then pd=pd-1:ps=ps+3:pt=pt+2:pi=pi-2:pw=pw-1
if pr=3 then pd=pd-1:ps=ps+1:pw=pw+1
if pr=4 then pd=pd+2:pt=pt-1:pi=pi+1:pw=pw+2
if pr=5 then pd=pd+1:ps=ps-1:pi=pi+2:pe=pe+1
if pr=6 then pd=pd+2:ps=ps-1:pt=pt+1:pi=pi+2
if pr=7 then pd=pd-1:ps=ps+2:pt=pt+1
if pr=8 then pd=pd+1:ps=ps+2:pi=pi-1:pw=pw-1:pe=pe+2
if pr=9 then pd=pd+1:pw=pw+1
zz$=rnd$:hp=((ps+pd+pt+pi+pw+pe)/6)+random(10):ep=0
zz$=rnd$:x=random(10):if x>5 then sh=0:ar=0:goto stat2
zz$=rnd$:sh=random(30):zz$=rnd$:ar=random(30)
stat2
print \\"Hit Points :"hp
print "Strength :"ps
print "Dexterity :"pd
print "Constitution :"pt
print "Intelligence :"pi
print "Wisdom :"pw
print "Energy Level :"pe
print "Shield :";:if sh print sh"%":else print "None"
print "Armor :";:if ar print ar"%":else print "None"
print \'
Hold while you are entered into the
BOOK of SPUR.....'
gosub nw.plyr
print \'
SPUR, the almighty and omnipotent,
senses your intrusion into HIS land!!
"Thou doust dare to enter MY land?
I await thee at the appointed site!"'
gosub rd.user
goto login1
main
cl=1:cr=0
gosub dwf.spur
goto login.5
; *** Login Routine ***
login
print \'A Wizard greets you and begs you wait.
Your status must be verified to pass...'
gosub tim.read
gosub rd.user
if (n1$=lg$) and (not info(5)) and (un<>dm) print \'
You were the last Adventurer. You must
wait till another passes through!'\:goto quit2
login1
gosub set.pa:xo=xf:xo$=xf$
if (not td) then text:home:print
if (not bd) goto login1.5
poke 35,20
a$=a1$+" "+a2$
l=len(a$)+12:a=peek(33)-l:a=a/2:l=peek(33)-l:l=l-a
print #3 @1,22 chr$(45,a)"[ #"right$(" "+str$(un),4)"-"a$" ]-"chr$(45,l):print #3 @1,1
gosub tim.chk:gosub screen
login1.5
xt$="":xt=0
print \"WELCOME "n1$"! Venture forth!"
print \"The last Adventurer was "lg$
print "There have been "np" players in SPUR."
if (not info(5)) and (un<>dm) goto login2
input @0\"Link Sysop Utilities? "a$:if a$="Y" then dy$=ds$+"spur.sysop":link dy$
login2
tm=0
if cr then dy$=dz$+"spur.main":link dy$,"travel3"
dy$=dz$+"spur.shop":link dy$
; ***************
; * Show File *
; ***************
show.file
setint(1):print \s$\:copy f$:setint(""):return
; ***********************
; * Read Player Stats *
; ***********************
rd.user
dy$=dx$+"spur.users"
open #1,dy$:position #1,130,pn
input #1,n1$,sn,pn,cl,cr,hp
input #1,ps,pt,pi,pe,pw,pd
input #1,gh,gl,bh,bl,sh,ar,pc,pr,ep,mk,mm,xp
input #1,df,sl,sr:close
dy$=dx$+"spur.allies"
open #1,dy$:position #1,78,pn
input #1,d1$,a1,h1\d2$,a2,h2\d3$,a3,h3
close
dy$=dx$+"spur.weapons"
open #1,dy$:position #1,64,pn
input #1,xw\xw$:close
dy$=dx$+"spur.stores"
open #1,dy$:position #1,44,pn
input #1,xf\xf$:close
dy$=dx$+"spur.items"
open #1,dy$:position #1,84,pn
input #1,xi\xi$:close
dy$=dx$+"spur.monsters"
open #1,dy$:position #1,44,pn
input #1,xm\xm$:close
dy$=dx$+"spur.spells"
open #1,dy$:position #1,44,pn
input #1,xs\xs$:close
return
; ************************
; * Write Player Stats *
; ************************
wr.user
dy$=dx$+"spur.users"
open #1,dy$:position #1,130,pn
print #1,n1$,sn,pn,cl,cr,hp
if (not sn) close:return
print #1,ps,pt,pi,pe,pw,pd
print #1,gh,gl,bh,bl,sh,ar,pc,pr,ep,mk,mm,xp
print #1,df,sl,sr:close
dy$=dx$+"spur.allies"
open #1,dy$:position #1,78,pn
print #1,d1$,a1,h1\d2$,a2,h2\d3$,a3,h3
close
dy$=dx$+"spur.weapons"
open #1,dy$:position #1,64,pn
print #1,xw\xw$:close
dy$=dx$+"spur.stores"
open #1,dy$:position #1,44,pn
print #1,xf\xf$:close
dy$=dx$+"spur.items"
open #1,dy$:position #1,84,pn
print #1,xi\xi$:close
if xm<=10 goto wr.user3
x=xm-10
for a=1 to x
zz$=rnd$:b=random(xm):if b=0 then b=1
y=(b*4)-3:l=len(xm$)
if y=1 then xm$=mid$(xm$,5):goto wr.user2
if (y+4)>l then xm$=left$(xm$,y-1):goto wr.user2
xm$=left$(xm$,y-1)+mid$(xm$,y+4)
wr.user2
xm=xm-1
next:xm=10
wr.user3
dy$=dx$+"spur.monsters"
open #1,dy$:position #1,44,pn
print #1,xm\xm$:close
dy$=dx$+"spur.spells"
open #1,dy$:position #1,44,pn
print #1,xs\xs$:close
return
; ****************
; * New Player *
; ****************
nw.plyr
gosub dwf.spur
f$=dx$+"spur.users"
open #1,f$
if sn goto nw.plyr2
sn=un:x=1
nw.plyr1
position #1,130,x:input #1,a$,n
if (not n) then pn=x:goto nw.plyr2
x=x+1:goto nw.plyr1
nw.plyr2
position #1,130,pn
print #1,n1$,sn,pn,1,0,hp
print #1,ps,pt,pi,pe,pw,pd
print #1,0,1000,0,0,sh,ar,pc,pr,0,0,0,1
print #1,df,sl,sr
close
f$=dx$+"spur.allies"
open #1,f$
position #1,78,pn
for x=1 to 3:print #1,"*,0,0":next
close:if pn>np then np=pn
a=0:a$=""
f$=dx$+"spur.items"
open #1,f$:position #1,84,pn
print #1,a\a$:close
f$=dx$+"spur.weapons"
open #1,f$:position #1,64,pn
print #1,a\a$:close
f$=dx$+"spur.stores"
open #1,f$:position #1,44,pn
print #1,a\a$:close
dy$=dx$+"spur.monsters"
open #1,dy$:position #1,44,pn
print #1,a\a$:close
dy$=dx$+"spur.spells"
open #1,dy$:position #1,44,pn
print #1,a\a$:close
f$=dx$+"spur.time"
open #1,f$:position #1,12,pn
print #1,a\a$:close
gosub tim.read
return
; ***************************
; * Set Player Attributes *
; ***************************
set.pa
pa=ps+pd+pt+pi+pw+pe:pa=pa mod 10
return
dwf.spur
if lc=0 print\"Maze undefined..."\"Create Levels/Rooms and re-initialize.":return
zz=flag:z1=edit(5)+3072:flag=z1:fill z1,255,0
f1$=dx$+"d.level1":gosub rd.lvl
zz$=rnd$:df=random(nr)
if df=0 then df=pn
dwf
if df>nr then df=df mod nr
if flag(df) goto spur
df=df+1:goto dwf
spur
fill z1,255,0
s1=s1+1:if s1>1c then s1=1c
f1$=dx$+"d.level"+str$(s1)
gosub rd.lvl:
zz$=rnd$:sr=random(nr)
if sr=0 then sr=pn
spur.2
if sr>nr then sr=sr mod nr
if flag(sr) then flag=zz:return
sr=sr+1:goto spur.2
rd.lvl
open #1,f1$
input #1,ln$,nr,ri
read #1,z1,255:close:return
; **********************
; * Time Subroutines *
; **********************
tim.chk
ex=clock(1)-ew:if ex=>ev pop:goto quit1
return
tim.read
dy$=dx$+"spur.time":open #1,dy$
mt=mv:if mv=0 then mt=0:goto set.time
position #1,12,un
input #1,a$,eu
b$=left$(date$,5)+"":if a$<>b$ then eu=0
set.time
close
if (not flag(34)) goto set.1
eu=0:if mt=0 then ev=3600:return
ev=mt:return
set.1
if mt=0 then mt=clock(2)-clock(1):eu=0
ev=mt-eu
if ev>(clock(2)-clock(1)) then ev=clock(2)-clock(1)
if ev>0 return
gosub tim.mess:recall "a:var":link "a:main.seg","fromsys"
tim.mess
print\'
Alas...the sun has set on yet another
adventurer within the Land of Spur.
Wake ye early in the morning after a
long rest to resume your quest!!!'
return
; ************************
; * Screen Subroutines *
; ************************
screen
print #3 @1,23 "LV: RM: |PS: PC: PW: "
print #3 @1,24 "MV: EP: |PE: PD: PI: ";
if peek(33)=40 goto scn.rtn
print #3 @41,23 "|RT: IT: WP: AR: SH: KL:"
print #3 @41,24 "|XL: TI: GH: DR: SR:";
scn.rtn
print #3 @1,20
return
scn.rst
if bd poke 35,24
home:if (not td) print ^
return
; ***********************
; * Save Player stats *
; ***********************
quit
if cr=0 goto quit.a
if pw<7 then pw=pw+2
if pi<7 then pi=pi+2
if ps<10 then ps=ps+2
if pe<10 then pe=pe+2
if hp<20 then hp=hp+2
quit.a
if (mv>0) and (ex=>ev) gosub tim.mess
print \'SPUR says hold whilst your adventure
is written in the BOOK of SPUR....'
dy$=dx$+"spur.data"
open #1,dy$
print #1,g$,np,go,oh,ol,og,n1$
print #1,lc,mc,ic,sc,wc,ac,cg
print #1,pq,sd,mv,td,bd
print #1,dh,dl:close
if (not mv) goto quit.b
eu=eu+ex:a$=left$(date$,5)+"":if left$(cm$,5)<>a$ then eu=0
dy$=dx$+"spur.time":open #1,dy$
position #1,12,un
print #1,a$,eu
close
quit.b
gosub wr.user
dy$=dx$+"spur.log"
create dy$:open #1,dy$:append #1
if wn print #1,"Player "n1$" met game objective.":close:return
print #1,"#"right$(" "+str$(un),3)" Lvl: "right$(" "+str$(xp),2)" HP: "right$(" "+str$(hp),2)" "n1$
close:print \"It is written!":wn=0
return
; *****************
; * Link to BBS *
; *****************
quit1
gosub quit
on nocar goto quit4
quit2
gosub scn.rst:set zz$="":recall "a:var"
link "a:main.seg","fromsys"
quit3
gosub quit
quit4
gosub scn.rst:set zz$="":recall "a:var"
link "a:main.seg","term1"